<template>
  <div class="layouts-logo" :class="{ fold: !permissionStore.isExpand }">
    <img src="@/assets/vue.svg" alt="logo" />
    <div>Vue3+Element-PlusPlusPlusPlusPlusPlusPlusPlusPlus</div>
  </div>
</template>

<script setup lang="ts">
import { usePermissionStore } from '@/store';

const permissionStore = usePermissionStore();
</script>

<style lang="scss" scoped>
.layouts-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  overflow: hidden;
  flex-wrap: nowrap;
  padding: 10px;
  box-sizing: border-box;
  border-right: 1px solid var(--el-menu-border-color);
  width: 100%;
  transition: all 0.3s;

  img {
    width: 32px;
    height: 32px;
  }
  div {
    margin-left: 10px;
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.fold {
  width: calc(var(--el-menu-icon-width) + var(--el-menu-base-level-padding) * 2);
  // 增加过渡效果
  transition: all 0.3s;
}
</style>
